package xianchen;

public class Xian2 extends Thread{
	private String name;


	public Xian2(String name) {
		super();
		this.name = name;
	}

		public void run() {
        //设定循环次数；
			for(int i=0;i<3;i++) {
				System.out.println("线程"+name);
			
			
         //		死循环；
			/*while (true){
				System.out.println("线程"+name);*/
		
				
				try {
					Thread.sleep(1000);
					} catch (InterruptedException e) {
						e.printStackTrace();
					}
				}
			}
}
